import LoginForm from './components/LoginForm';
import loginLeft from '@/assets/images/login_left.svg';
import logo from '@/assets/images/minelogo.svg';
import bg from '@/assets/images/login_bg.svg';
import { useEffect } from 'react';
import { IPCsend } from 'electronIPC';

const Login = () => {
	useEffect(() => {
		IPCsend('inLoginPage');
		return () => {
			IPCsend('leaveLoginPage');
		};
	}, []);
	return (
		<div
			className=' flex items-center h-full bg-cover electron-move'
			style={{
				backgroundImage: `url(${bg})`,
				backgroundPosition: '50%',
				backgroundSize: '100% 100%',
			}}>
			<div className=' flex-1 md:flex hidden  '>
				<img src={loginLeft} alt='login' className=' w-96 m-auto' />
			</div>
			<div className=' flex-1 flex'>
				<div className=' w-96 m-auto electron-move-dis'>
					<div className=' flex items-center mb-4'>
						<img className=' h-10 ' src={logo} alt='logo' />
						<span style={{ color: '#60dafb' }} className=' text-3xl font-bold ml-1 '>
							.pakchoi
							<span className=' text-sm ml-1'>{''}</span>
						</span>
					</div>
					<LoginForm />
				</div>
			</div>
		</div>
	);
};

export default Login;
